package com.codenjoy.tdd;

public class FizzBuzzSolver {

    public static String get(int num) {
        StringBuilder result = new StringBuilder();
        if (num <= 0){
            throw new IllegalArgumentException("Wrong number!");
        }
        if (num % 3 == 0 || String.valueOf(num).contains("3")){
            result.append("fizz");
        }
        if (num % 5 == 0){
            result.append("buzz");
        }
        if (result.length()==0){
            result.append(num);
        }
        return result.toString();
    }

}



